package cn.itcast.com.Thread.Threadpoor;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class demo1 {
    public static void main(String[] args) {
        constructorThreadPool();
        ExecutorService executorService = Executors.newCachedThreadPool();
        executorService.submit(new Callable<Integer>() {
            @Override
            public Integer call() throws Exception {
                return 3;
            }

        });

    }

    public static void constructorThreadPool(){
        ExecutorService executorService = Executors.newCachedThreadPool();
        ExecutorService executorService1 = Executors.newFixedThreadPool(4);

    }
}
